/**
* 版权声明：厦门睿商网络科技有限公司 版权所有 违者必究
* 日    期：2020-11-30
*/
package com.rzico.basics.entity;

import com.rzico.annotation.IgnoreSwaggerParameter;
import lombok.Data;
import java.util.Date;
import javax.persistence.*;
import io.swagger.annotations.ApiModelProperty;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;

/**
 * <pre>
 *   送货线路数据库对象
 * </pre>
 * @author Rzico Boot
 * @version 1.0
 */
@Data
@JsonIgnoreProperties(value = {"handler"})
@JsonInclude(JsonInclude.Include.NON_NULL)
@Table(name = "wx_shipping_line")
public class ShippingLine{
    @Id
    @ApiModelProperty(value = "" )
    protected Long id;

    @ApiModelProperty(value = "创建日期" )
    protected java.util.Date createDate;

    @ApiModelProperty(value = "修改日期" )
    protected java.util.Date modifyDate;

    @ApiModelProperty(value = "线路名称" )
    protected String name;

    @ApiModelProperty(value = "车辆ID" )
    protected Long carId;

    @ApiModelProperty(value = "企业" )
    protected Long enterpriseId;


    /**
     * 当前对象的量表信息
     */
    @JsonIgnore
    @IgnoreSwaggerParameter
    protected Car car;

    public String getCarName() {
        Car car = getCar();
        if (car!=null) {
            return car.getName();
        } else {
            return null;
        }
    }

    public String getDriverName() {
        Car car = getCar();
        if (car!=null) {
            return car.getDriverName();
        } else {
            return null;
        }
    }

    public void setCarName(String value) {

    }

    public void setDriverName(String value) {

    }

}
